package com.it.emall.mapper;

import com.it.emall.domain.Ingredients;
import jdk.nashorn.internal.ir.CallNode;

import java.util.List;

public interface IngredientsMapper {


    /**
     * 搜索
     */
    List<Ingredients> selectIngredients(String name);
    /**
     * 查询分类列表(一级)
     * @return
     */
    List<Ingredients> selectIngredientsList();

    /**
     * 通过父分类ID查询子分类
     */
    List<Ingredients> selectChildrenIngredientsByPid(Integer pid);


    /**
     * 添加分类
     */
    int insertIngredients(Ingredients ingredients);

    /**
     * 修改分类
     *
     */
    int  updateIngredients(Ingredients ingredients);

    /**
     * 删除分类
     */
    int deleteIngredients(Integer id);


    /**
     * 通过id查询分类
     */

    Ingredients selectIngredientsById(Integer id);




}
